<html>
<head><meta charset="utf-8"><title>Why all the type hints? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Why.20all.20the.20type.20hints.3F.html">Why all the type hints?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212457605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Why%20all%20the%20type%20hints%3F/near/212457605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyler Hawkes <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Why.20all.20the.20type.20hints.3F.html#212457605">(Oct 06 2020 at 17:13)</a>:</h4>
<p>Can anyone tell me why all the type hints are needed for the <code>apply</code> and <code>apply_mut</code> methods? <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=957be80e139969f59a2a27cc8fe930b5">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=957be80e139969f59a2a27cc8fe930b5</a></p>



<a name="212459508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Why%20all%20the%20type%20hints%3F/near/212459508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyler Hawkes <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Why.20all.20the.20type.20hints.3F.html#212459508">(Oct 06 2020 at 17:30)</a>:</h4>
<p>If you remove the new type wrappers around the FnOnce types then it can infer properly. Is there a reason that this can't be done through a type that should be optimized away?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>